<?php include "counter.php" ?>
<html>
<?php pagehead("Administrative Interface") ?>
<body>
<?php pagetop("Linux Counter Administrative Interface") ?>
<strong>You are logged in as user <?php echo getenv('REMOTE_USER') ?></strong> 
<p>
The powers you have at the moment are:
<ul>
<li>Modify info on places
of the counter yet, but will be.
<li>List users under a place
<li>Find random users
<li>Edit those users' records
</ul>
If you change an user's contact email (the first one), he will get
email sent to him (both old and new address). Take care!
<p>
<h2>List functions</h2>
<ul>
<li><a href="/cgi-bin/adm/place.cgi">The Place Tree</a>
<li><a href="<?php print $counter_site ?>/reports/maintainers.php">The List of maintainers by place</a>
<li><a href="maintainers.php">The List of maintainers by name or login time</a>
<li><a href="recentusers.php">Watch registrations as they come in</a>
<li><a href="<?php print $counter_site ?>/reports/malusstatus.php">Attempts to crawl the counter</a>
<li><a href="lost-people.php">Registrations with lost email addresses. The list can be geographically limited</a>
</ul>
<h2>Search functions</h2>
<ul>
<li><a href="grep.php">The Old Search Form</a>
<li><a href="search.php">The New Search Form</a>
<li><a href="freetextsearch.php">Free text search</a> for persons &amp; frozen
<li><a href="machine_search.php">Search for some kinds of machine information</a>
</ul>
<h2>Update functions</h2>
<ul>
<li><a href="update.php">Single User Update</a>
<li>Show all <a href="duplicates.php">duplicate registrations</a> at country level
</ul>
<h2>Research functions</h2>
<ul>
<li><a href="oldfrozen.php">Old frozen records (do research to find them)</a>
</ul>
<h2>Other functions</h2>
<ul>
<li><a href="/cgi-bin/adm/adminlogin.cgi">Login to your counter entry</a>
<li><a href="password.php">Change your admin password</a>
</ul>
<h2>My places</h2>
<?php

function showmaintainedplaces($login)
{

  $query = mysql_query("select places.f_key, name, longname from places,
  link_place_maintainer, users where
     places.f_key = link_place_maintainer.fromkey
     and users.login = '$login'
      and link_place_maintainer.tokey = users.f_key");
  if ($query == 0) {
    print("MySQL error: " . mysql_errno() . ":" . mysql_error() . "<br>");
    die("Query for maintained places failed");
  }
  print "<ul>\n";
  while ($arr = mysql_fetch_array($query)) {
    print "<li> <a href=\"/cgi-bin/adm/place.cgi?place=". $arr[0] . "\">";
    print $arr[1] . " - " . $arr[2] . "</a>\n";
  }
  print "</ul>\n";
}

showmaintainedplaces(getenv('REMOTE_USER'));

?>

<h2>Documentation</h2>
<a href="<?php print $counter_site ?>/~tabatha/">The Linux Counter Manager's
HOWTO</a> by Tabatha Marshall &lt;<?php print emailCloaking("tabatha@merlinmonroe.com", 0) ?>&gt; is your source
of information on how to do things in the counter.
Give feedback!
<p>
<a href="<?php print $counter_site ?>/help/places.php">A brief note on places</a>
<p>

Enjoy!
<p>
Harald T. Alvestrand &lt;<?php print emailCloaking("Harald@Alvestrand.no", 0) ?>&gt;
<?php pagebottom() ?>
</body>
</html>
